package cn.hbads.version.domain.version.aggregate;

import cn.hbads.version.domain.version.model.BusinessModel;
import cn.hbads.version.domain.version.model.DataVersionModifyModel;
import cn.hbads.version.domain.version.model.VersionType;

import java.time.LocalDate;

/**
 * <b> 数据版本抽象接口 </b>
 *
 * @author : yvvb
 * @date : 2025/5/5
 */
public interface DataVersion<T> {

    /*---状态|基本信息---*/
    T getDataId();

    String getDataName();

    Integer getDataType();

    VersionType getVersionType();

    void setVersionType(VersionType versionType);

    LocalDate getVersionDate();

    void setVersionDate(LocalDate versionDate);

    LocalDate getExpirationDate();

    void setExpirationDate(LocalDate expirationDate);

    String getCreatedMsg();

    String getDeletedMsg();

    boolean isDeleted();

    void setDeleted(boolean deleted);

    boolean isChanged();

    void setChanged(boolean changed);

    boolean isRemoved();

    void setRemoved(boolean removed);

    void setVersionDate();

    void setExpirationDate();

    Class<? extends BusinessModel> getBusinessModelClass();
    
    /*----业务方法----*/
    <E extends DataVersion<T>> E splitVersion(LocalDate splitDate);

    <E extends DataVersion<T>> E moveVersion(LocalDate targetDate);

    void modifyVersion(DataVersionModifyModel modifyModel);

    BusinessModel toBusinessModel();

    DataVersion<T> clone();

}
